﻿<Window x:Class="PMisuseAn.AddStateMachineWindow"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" 
        xmlns:wfi="clr-namespace:System.Windows.Forms.Integration;assembly=WindowsFormsIntegration"
        xmlns:wf="clr-namespace:System.Windows.Forms;assembly=System.Windows.Forms"
        Title="State machine editor" Height="737" Width="967"
        Icon="images\title.ico"
        VerticalAlignment="Top" HorizontalAlignment="Left" ResizeMode="NoResize" Loaded="Window_Loaded">

    <Grid Width="950" Height="692">
        <Rectangle Fill="#FFEEFFFF" Height="692" HorizontalAlignment="Left" Name="rectangle1" Stroke="Black" StrokeThickness="0" VerticalAlignment="Top" Width="315" />
        <TreeView  Height="658" HorizontalAlignment="Left" Margin="12,29,0,0" 
                   Name="treeView1" VerticalAlignment="Top" Width="306" 
                   ScrollViewer.VerticalScrollBarVisibility="Auto">
            <TreeViewItem Header="Root" IsExpanded="True" Selected="state_machine_root_TreeViewItem_Selected" Tag="root" Name="state_machine_root">
                <TreeViewItem Header="Events" IsExpanded="True" Selected="events_root_TreeViewItem_Selected" Name="events">
                    <TreeViewItem Header="New..    " Selected="event_TreeViewItem_Selected" Tag="" FontStyle="Italic" Foreground="#FF2323AA"/>
                </TreeViewItem>
                <TreeViewItem Header="States" IsExpanded="True" Selected="states_root_TreeViewItem_Selected" Name="states">
                    <TreeViewItem Header="New..     " Selected="state_TreeViewItem_Selected" Tag="" FontStyle="Italic" Foreground="#FF2323AA" Margin="5">
                    </TreeViewItem>
                </TreeViewItem>
                <TreeViewItem Header="Transitions" IsExpanded="True" Selected="transitions_root_TreeViewItem_Selected" Name="transitions">
                    <TreeViewItem Header="New..     " Selected="transition_TreeViewItem_Selected" Tag="new" FontStyle="Italic" Foreground="#FF2323AA"/>
                </TreeViewItem>
            </TreeViewItem>
            <TreeViewItem Header="" IsExpanded="false" Visibility="Visible"/>
        </TreeView>
        <Label Content="State Machine" Height="30" HorizontalAlignment="Left" Margin="7,2,0,0" Name="label1" VerticalAlignment="Top" Width="196" />
        <TextBox Height="27" HorizontalAlignment="Left" Margin="392,422,0,0" Name="new_ent_name_tb" VerticalAlignment="Top" Width="545" Visibility="Hidden" />
        <Label Content="Name" Height="28" HorizontalAlignment="Left" Margin="327,422,0,0" Name="new_ent_Name_l" VerticalAlignment="Top" Visibility="Hidden" />
        <Button Content="Apply" Height="23" Style="{DynamicResource LinkButton}" HorizontalAlignment="Left" Margin="845,669,0,0" Name="apply_new_event_b" VerticalAlignment="Top" Width="40" Click="apply_new_event_b_Click" Visibility="Hidden" />
        <TextBox Height="44" HorizontalAlignment="Left" Margin="392,450,0,0" Name="new_ent_desc_tb" VerticalAlignment="Top" Width="545" Visibility="Visible" />
        <Label Content="Description" Height="28" HorizontalAlignment="Left" Margin="324,456,0,0" Name="desc_l" VerticalAlignment="Top" Visibility="Visible" />
        <Button Content="Update" Height="23" HorizontalAlignment="Left" Margin="845,669,0,0" Name="update_event_b" Style="{DynamicResource LinkButton}" VerticalAlignment="Top" Visibility="Hidden" Width="40" Click="update_event_b_Click" />
        <Button Content="Delete" Height="23" HorizontalAlignment="Right" Margin="0,669,15,0" Name="delete_event_b" Style="{DynamicResource LinkButton}" VerticalAlignment="Top" Visibility="Hidden" Width="40" Foreground="#FFD82727" Click="delete_event_b_Click" />
        <GroupBox Header="" Height="55" HorizontalAlignment="Left" Margin="313,640,0,0" Name="new_event_ppties_gb" VerticalAlignment="Top" Width="513" Visibility="Hidden" BorderBrush="{x:Null}">
            <Grid Width="498" Height="34">
                <Label Content="Type:" Height="28" HorizontalAlignment="Left" Margin="-2,-7,0,0" Name="label2" VerticalAlignment="Top" FontWeight="SemiBold" />
                <RadioButton Content="Request" Height="16" HorizontalAlignment="Left" Margin="73,16,0,0" Name="request_event_rb" VerticalAlignment="Top" GroupName="event_type_g" Tag="request" IsChecked="True" />
                <RadioButton Content="Response" Height="16" HorizontalAlignment="Left" Margin="2,16,0,0" Name="response_event_rb" VerticalAlignment="Top" GroupName="event_type_g" Tag="response" />
                <Label Content="Triggers:" Height="28" Margin="148,-7,285,0" Name="label3" VerticalAlignment="Top" FontWeight="SemiBold" />
                <CheckBox Content="Timed event" Height="16" HorizontalAlignment="Left" Margin="229,16,0,0" Name="time_event_cb" VerticalAlignment="Top" Tag="timed" Unchecked="new_event_trigger_CheckedUnchecked" Checked="new_event_trigger_CheckedUnchecked" />
                <CheckBox Content="Signal event" HorizontalAlignment="Left" Margin="318,16,0,0" Name="signal_event_cb" Tag="signal" Unchecked="new_event_trigger_CheckedUnchecked" Checked="new_event_trigger_CheckedUnchecked" Height="20" VerticalAlignment="Top" />
                <CheckBox Content="Call event" Height="16" HorizontalAlignment="Left" Margin="154,16,0,0" Name="call_event_cb" VerticalAlignment="Top" Tag="call" Unchecked="new_event_trigger_CheckedUnchecked" Checked="new_event_trigger_CheckedUnchecked" />
                <CheckBox Content="Change event" Height="16" HorizontalAlignment="Left" Margin="403,16,0,0" Name="change_event_cb" VerticalAlignment="Top" Tag="change" Checked="new_event_trigger_CheckedUnchecked" Unchecked="new_event_trigger_CheckedUnchecked" />
            </Grid>
        </GroupBox>
        <Button Background="WhiteSmoke" Content="Define" Height="18" HorizontalAlignment="right" Margin="0,624,3,50" Name="define_state_b" Style="{DynamicResource LinkButton}" Width="45" Click="define_state_b_Click" Visibility="Hidden" />
        <Button Background="WhiteSmoke" Content="Update" Height="18" HorizontalAlignment="right" Margin="0,624,52,50" Name="update_state_b" Style="{DynamicResource LinkButton}" Width="45" Click="update_state_b_Click" Visibility="Hidden" />
        <Button Background="WhiteSmoke" Content="Delete" Height="18" HorizontalAlignment="right" Margin="0,624,7,50" Name="delete_state_b" Style="{DynamicResource LinkButton}" Width="45" Foreground="#FFEB2A2A" Click="delete_state_b_Click" Visibility="Hidden" />
        <GroupBox Header="Operational Attributes" Height="155" HorizontalAlignment="Left" Margin="319,496,0,0" Name="operational_atts_gb" VerticalAlignment="Top" Width="622" Visibility="Hidden">
            <Grid Height="143" Width="616">
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="17*" />
                    <ColumnDefinition Width="203*" />
                    <ColumnDefinition Width="395*" />
                </Grid.ColumnDefinitions>
                <ListBox Height="109" HorizontalAlignment="Left" Margin="6,22,0,0" Name="agentAttributes_lb" ToolTip="attributes of information receivers/ senders" VerticalAlignment="Top" Width="196" Grid.ColumnSpan="2" />
                <Label Content="Agent (actors) attributes" Height="28" HorizontalAlignment="Left" Margin="2,0,0,0" Name="label4" ToolTip=" (info. receivers/senders)" VerticalAlignment="Top" Grid.ColumnSpan="2" />
                <Label Content="Environmental attributes" Grid.ColumnSpan="2" Height="28" HorizontalAlignment="Left" Margin="190,-1,0,0" Name="label5" VerticalAlignment="Top" Grid.Column="1" />
                <!--<Label Content="Functional attributes" Grid.Column="2" Height="28" HorizontalAlignment="Left" Margin="191,0,0,0" Name="label6" VerticalAlignment="Top" />-->
                <ListBox Grid.ColumnSpan="2" Height="110" HorizontalAlignment="Left" Margin="190,22,0,0" Name="environmentAttributes_lb" ToolTip="attributes of mobile environment" VerticalAlignment="Top" Width="202" Grid.Column="1" />
                <!--<ListBox Grid.Column="2" Height="110" HorizontalAlignment="Left" Margin="195,22,0,0" Name="functionalAttributes_lb" ToolTip="functional attributes" VerticalAlignment="Top" Width="195" />-->
            </Grid>
        </GroupBox>
        <Button Content="Apply" Height="23" HorizontalAlignment="Left" Margin="894,670,0,0" Name="state_action_apply_b" Style="{DynamicResource LinkButton}" VerticalAlignment="Top" Width="40" Click="state_action_apply_b_Click" Visibility="Hidden"  />
        <Button Content="Update" Height="23" HorizontalAlignment="Left" Margin="843,670,0,0" Name="state_action_update_b" Style="{DynamicResource LinkButton}" VerticalAlignment="Top" Width="40" Click="state_action_update_b_Click" Visibility="Hidden" />
        <Button Content="Delete" Foreground="#FFD82727" Height="23" HorizontalAlignment="Left" Margin="893,670,0,0" Name="state_action_delete_b" Style="{DynamicResource LinkButton}" VerticalAlignment="Top" Width="40" Click="state_action_delete_b_Click" Visibility="Hidden"  />
        <GroupBox Header="Transition policies" Height="157" HorizontalAlignment="Left" Margin="319,492,0,0" Name="transitionPolicies_gb" VerticalAlignment="Top" Width="622" Visibility="Hidden">
            <Grid Height="136" Width="612" Visibility="Visible">
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="182*" />
                    <ColumnDefinition Width="327*" />
                </Grid.ColumnDefinitions>
                <ListBox Height="128" HorizontalAlignment="Left" Margin="8,5,0,0" Name="transition_policies_lb" ToolTip="Transition policies" VerticalAlignment="Top" Width="600" Grid.ColumnSpan="2" Visibility="Visible" />
            </Grid>
        </GroupBox>
        <Label Content="Start state" Height="28" HorizontalAlignment="Left" Margin="327,462,0,0" Name="start_state_l" VerticalAlignment="Top" Visibility="Hidden" />
        <ComboBox Height="23" HorizontalAlignment="Left" Margin="392,464,0,0" Name="start_state_cb" VerticalAlignment="Top" Width="132" IsEditable="False" IsEnabled="False" Visibility="Hidden" />
        <Label Content="End state" Height="28" HorizontalAlignment="Left" Margin="750,462,0,0" Name="end_state_l" VerticalAlignment="Top" Visibility="Hidden" />
        <ComboBox Height="23" HorizontalAlignment="Left" Margin="809,464,0,0" Name="end_state_cb" VerticalAlignment="Top" Width="128" IsEnabled="False" Visibility="Hidden" />
        <Label Content="Assoc. event" Height="28" HorizontalAlignment="Left" Margin="531,462,0,0" Name="ass_event_l" VerticalAlignment="Top" Visibility="Hidden" />
        <ComboBox Height="23" HorizontalAlignment="Left" Margin="608,464,0,0" Name="associated_event_cb" VerticalAlignment="Top" Width="128" IsEnabled="False" Visibility="Hidden" SelectionChanged="reloadStateTransitionsPolicyStatementList_ass_event_cb_SelectionChanged" />
        <Button Content="Apply" Height="23" HorizontalAlignment="Left" Margin="897,652,0,0" Name="apply_new_state_transition_b" Style="{DynamicResource LinkButton}" VerticalAlignment="Top" Width="40" Click="apply_new_state_transition_b_Click" Visibility="Visible" />
        <Button Content="Update" Height="23" HorizontalAlignment="Left" Margin="845,650,0,0" Name="update_new_state_transition_b" Style="{DynamicResource LinkButton}" VerticalAlignment="Top" Width="40" Click="update_new_state_transition_b_Click" Visibility="Visible" />
        <Button Content="Delete" Foreground="#FFD82727" Height="23" HorizontalAlignment="Left" Margin="895,650,0,0" Name="delete_state_transition_b" Style="{DynamicResource LinkButton}" VerticalAlignment="Top" Visibility="Visible" Width="40" Click="delete_state_transition_b_Click" />

        <Grid Height="428" HorizontalAlignment="Left" Margin="318,-7,0,0" Name="glee_grid" VerticalAlignment="Top" Width="620" Background="White">
            <wfi:WindowsFormsHost Margin="3,6" Name="fsm_wfh">
            </wfi:WindowsFormsHost>
        </Grid>
        <Button Content="Expand" Foreground="#FFD82727" Height="23" HorizontalAlignment="Left" Margin="273,7,0,0" Name="expand_graph_b" Style="{DynamicResource LinkButton}" VerticalAlignment="Top" Visibility="Visible" Width="42" ToolTip="expand graph" Click="expand_graph_b_Click" />
        <CheckBox Content="isCallable" Height="16" HorizontalAlignment="Left" Margin="388,500,0,0" Name="isCallableState_cb" VerticalAlignment="Top" Width="73" IsChecked="True" />
        <CheckBox Content="isCallable" Height="16" HorizontalAlignment="Left" IsChecked="True" Margin="392,653,0,0" Name="isCallableTransition_cb" VerticalAlignment="Top" Width="73" />
    </Grid>
</Window>


